package com.example.framework509.codeGen.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.example.framework509.common.annotation.entityAnnotations.VerifyMultiRepetitionField;

import java.util.Date;

@TableName("gen_mapper")
public class Mapper {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String mapperType;

    @VerifyMultiRepetitionField
    private Integer primaryEntityId;

    @VerifyMultiRepetitionField
    private Integer secondaryEntityId;

    @TableLogic
    private Date isDeleted;

    @Version
    private Integer version;

    @Override
    public String toString() {
        return "Mapper{" +
                "id=" + id +
                ", mapperType='" + mapperType + '\'' +
                ", primaryEntityId='" + primaryEntityId + '\'' +
                ", secondaryEntityId='" + secondaryEntityId + '\'' +
                ", isDeleted=" + isDeleted +
                ", version=" + version +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPrimaryEntityId() {
        return primaryEntityId;
    }

    public void setPrimaryEntityId(Integer primaryEntityId) {
        this.primaryEntityId = primaryEntityId;
    }

    public Integer getSecondaryEntityId() {
        return secondaryEntityId;
    }

    public void setSecondaryEntityId(Integer secondaryEntityId) {
        this.secondaryEntityId = secondaryEntityId;
    }

    public Date getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Date isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getMapperType() {
        return mapperType;
    }

    public void setMapperType(String mapperType) {
        this.mapperType = mapperType;
    }
}
